package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/13 18:30
 * 邮箱：648859026@qq.com
 */
public class UnbindWechatAccountAction extends AHttpService<PbBean.PbResUserUnbindWeChatAccount>{
    /**
     * 解绑微信帐号
     * @param context
     * @param thirdId 微信帐号
     * @return
     */
    public static UnbindWechatAccountAction newInstance(Context context, String thirdId){
        return new UnbindWechatAccountAction(context, thirdId);
    }
    private String thirdId;
    private UnbindWechatAccountAction(Context context, String thirdId) {
        super(context);
        this.thirdId = thirdId;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqUserUnbindWeChatAccount.Builder builder = PbBean.PbReqUserUnbindWeChatAccount.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setThirdId(thirdId);

        return apiService.unbindWechatAccount(builder.build());
    }
}
